<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/adicional/templates/templateHome.xhtml">

	<ui:define name="tituloPagina">
		Alterar Telefones
	</ui:define>
	
	<ui:define name="conteudoCabecalho">
	
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/resources/js/clinica/alterarTelefoneFormulario.js">
		</script>
		
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/resources/js/clinica/clinica.js">
		</script>
	
	</ui:define>
	
	<ui:define name="conteudoCentro">
	
		<h:form id="formularioAlterarTelefone">
		
		<div>
			<p:messages showSummary="true" showDetail="true" closable="true"></p:messages>
		</div>
		
		<div class="ui-messages-error ui-corner-all campo_invisivel" id="containerErro">
				
				
		</div>
			
			<div>
				<h:outputLabel value="DDD: " for="dddClinica" />
				<h:inputText value="#{clinica.dddClinicaAlt}" id="dddClinica" maxlength="2" label="DDD"
				 binding="#{clinica.campoDddClinicaAlt}"/>
			</div>
			
			<div>
				<h:outputLabel value="Telefone: " for="telefoneClinica" />
				<h:inputText value="#{clinica.telefoneClinicaAlt}" id="telefoneClinica" maxlength="9" label="Telefone" 
				binding="#{clinica.campoTelefoneClinicaAlt}"/>
			</div>
			
			<div>
				<h:outputLabel value="Tipo Telefone: " for="tipoTelefone"/>
				<h:selectOneMenu value="#{clinica.codTipoTelefoneAlt}" binding="#{clinica.campoTipoTelefoneAlt}" 
				id="tipoTelefone" label="TipoTelefone" >
				
					<f:selectItem itemLabel="::SELECIONE::" itemValue="0"/>
					<f:selectItems value="#{clinica.listaTipoTelefoneAlt}"></f:selectItems>

				</h:selectOneMenu>
			</div>
			
			<div>
				<p:commandButton action="#{clinica.alterarTelefone()}" value="Enviar" onclick="return validarFormularioTelefoneAlt();" 
				update="@form"></p:commandButton>
				
				<p:commandButton action="#{clinica.limparFormularioAlterarTelefone}"  value="Limpar"
				 onclick="return limparFormularioTelefoneAlt();" update="@form" immediate="true"></p:commandButton>
			</div>
		
		
		</h:form>
	
	</ui:define>
	
</ui:composition>
</html>